import sys, os
INTERP = "/usr/bin/python2.7" #wersja 2.6 albo 2.7
if sys.executable != INTERP: os.execl(INTERP, INTERP, *sys.argv)

import os, sys, site
site.addsitedir('/home/thintion/rails/dl4/site-packages')
site.addsitedir('/home/thintion/rails')
site.addsitedir('/home/thintion/site-packages')
os.environ['LD_LIBRARY_PATH'] = '/usr/local/lib'

os.environ['DJANGO_SETTINGS_MODULE'] = 'dl4.settings'
import django.core.handlers.wsgi

#lapie bledy 500 ale potencjalnie wolniejsza metoda uruchomienia
from paste.exceptions.errormiddleware import ErrorMiddleware
application = django.core.handlers.wsgi.WSGIHandler()
application = ErrorMiddleware(application, debug=True)

#nie lapie bledow 500 ale szybszy
#application = django.core.handlers.wsgi.WSGIHandler() 

